package com.yu.rpc.core.serializer;

import com.yu.rpc.core.spi.SpiLoader;

public class SerializerFactory {
    static {
        SpiLoader.load(Serializer.class);
    }

    private static final String DEFAULT_SERIALIZER = SerializerKeys.JDK;

    public static Serializer getSerializer(String type) {
        Serializer serializer = SpiLoader.getInstance(Serializer.class, type);
        System.out.println("获取序列化器" + serializer.getClass().getName());
        return serializer;
    }
}
